﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AD.IBLL;
using HZT.Core.Service;
using HZT.Core.Cache;

namespace AD.WebEx
{
    public class ServiceContext
    {
        public static ServiceContext Current
        {
            get
            {
                return CacheHelper.GetItem<ServiceContext>("ServiceContext", () => new ServiceContext());
            }
        }

        public ICategoryService CategoryService
        {
            get
            {
                return ServiceHelper.CreateService<ICategoryService>();
            }
        }


        public IADService ADService
        {
            get
            {
                return ServiceHelper.CreateService<IADService>();
            }
        }

        public IDeptService DeptService
        {
            get
            {
                return ServiceHelper.CreateService<IDeptService>();
            }
        }
        public IPeriodService PeriodService
        {
            get
            {
                return ServiceHelper.CreateService<IPeriodService>();
            }
        }
        public ICustomerService CustomerService
        {
            get
            {
                return ServiceHelper.CreateService<ICustomerService>();
            }
        }
    }
}
